<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<%--非当前角色的用户列表--%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div id="main_role_list" class="easyui-layout" fit="true">
	<div region="north" style="padding:0px;border:0px">
	     <table style="width:100%" cellpadding="0" cellspacing="1" class="formtable">
			<tr>
				<td align="right">
					<label class="Validform_label" style="white-space:nowrap;">
						薪资发放时间:
					</label>
				</td>
				<td class="value">
					   <input id="noticeTerm" name="noticeTerm" type="text" style="width: 150px" 
			      						class="Wdate" onClick="WdatePicker()" >    
					<span class="Validform_checktip"></span>
					<label class="Validform_label" style="display: none;">阅读期限</label>
				</td>
			</tr>
		</table>
	</div>
    <div region="center" style="padding:0px;border:0px">
        <t:datagrid name="noCurRoleUserList" title="common.operation"
                    actionUrl="salaryPayRollReqController.do?addUserToRoleList" fit="true" fitColumns="true"
                    idField="id" checkbox="true" queryMode="group">
            <t:dgCol title="ID"  field="id"  hidden="true"  queryMode="group"  width="120"></t:dgCol>
		   <t:dgCol title="员工姓名"  field="userName"  hidden="false"   query="true"  width="320"></t:dgCol>
		   <t:dgCol title="银行卡号"  field="bankCard"  hidden="false"    width="100"  ></t:dgCol>
		   <t:dgCol title="薪资"  field="salary"  hidden="false"     width="60"  ></t:dgCol>
<%--             <t:dgCol title="编号" field="id" hidden="true"></t:dgCol> --%>
<%--             <t:dgCol title="common.username" sortable="false" field="userName" query="true"></t:dgCol> --%>
<%--             <t:dgCol title="common.real.name" field="realName" query="true"></t:dgCol> --%>
<%--             <t:dgCol title="common.status" sortable="true" field="status" replace="common.active_1,common.inactive_0,super.admin_-1"></t:dgCol> --%>
        </t:datagrid>
    </div>
</div>

<div style="display: none">
    <t:formvalid formid="formobj" layout="div" dialog="true" action="salaryPayRollReqController.do?doAddUserToRole" beforeSubmit="setUserIds">
        <input id="userIds" name="userIds">
        <input id="payDate" name="payDate">
        
    </t:formvalid>
</div>
<script>
    function setUserIds() {
        $("#userIds").val(getUserListSelections('id'));
        $("#payDate").val($("#noticeTerm").val());
        return true;
    }

    function getUserListSelections(field) {
        var ids = [];
        var rows = $('#noCurRoleUserList').datagrid('getSelections');
        for (var i = 0; i < rows.length; i++) {
            ids.push(rows[i][field]);
        }
        ids.join(',');
        return ids
    }
</script>
